# Maintaier: Antonio Rojas <arojas@archlinux.org>
# Contributor: Camille Monière <draslorus at draslorus dot fr>
# Contributor: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
# Contributor: Alexander Rødseth <rodseth at gmail dot com>
# Contributor: William Rea <sillywilly at gmail dot com>

pkgname=libmatio
pkgver=1.5.26
pkgrel=1
pkgdesc='C library with a fortran 90/95 module interface for reading/writing MATLAB MAT-files'
arch=(loong64 x86_64)
license=('custom:BSD')
url='https://sourceforge.net/projects/matio'
depends=(glibc
         hdf5
         zlib)
source=(https://github.com/tbeu/matio/releases/download/v$pkgver/matio-$pkgver.tar.gz)
sha256sums=('8b47c29f58e468dba7a5555371c6a72ad4c6aa8b15f459b2b0b65a303c063933')

build() {
  cd matio-$pkgver
  ./configure \
    --prefix=/usr \
    --enable-shared \
    --with-hdf5
  make
}

package() {
  cd matio-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
}
